/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.model.master;

import com.kmcsoft.emaster.entity.TrackableEntity;
import java.util.HashSet;
import java.util.Set;
import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 *
 * @author kmcsoft02
 */
@PersistenceCapable(detachable = "true", table = "shop_JewelryCost")
@FetchGroup(name = "detach_JewelryCost_ProductJewelry", members = {
    @Persistent(name = "jewelrys")})
public class JewelryCost extends TrackableEntity {

    @Persistent
    private String name;
    @Persistent
    private double cost;//cong von
    @Persistent
    private double price;//gia cong
    @Persistent(mappedBy = "jewelryCost")
    private Set<ProductJewelry> jewelrys;

    public JewelryCost() {
        jewelrys = new HashSet<ProductJewelry> ();
    }

    public Set<ProductJewelry> getJewelrys() {
        return jewelrys;
    }

    public void setJewelrys(Set<ProductJewelry> jewelrys) {
        this.jewelrys = jewelrys;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getCost() {
        return cost;
    }

    public void setCost(double cost) {
        this.cost = cost;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
